﻿namespace WMS6.Web.Common
{
    using System;
    using System.Text;
    using WMS6.Web;

    public class ImporDataAjax : BasePage
    {
        private void AssignFunctionResponse(string StrHtml)
        {
            string strType = base.Request.QueryString["TYPE"];
            base.Response.Clear();
            base.Response.StatusCode = 200;
            base.Response.StatusDescription = "OK";
            base.Response.ContentType = "text/html";
            base.Response.Write(strType + "@_@" + StrHtml);
            base.Response.Flush();
            base.Response.End();
            base.Response.Close();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            StringBuilder StrHtml = new StringBuilder();
            string StrImporData = string.Empty;
            if (base.UserInfo.Preference.Lang.ToUpper() == "ZH-CN")
            {
                StrImporData = "导入数据!";
            }
            else if (base.UserInfo.Preference.Lang.ToUpper() == "ZH-TW")
            {
                StrImporData = "導入數據!";
            }
            else
            {
                StrImporData = "Import Data!";
            }
            StrHtml.Append("<table width=\"520\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">");
            StrHtml.Append("<tr><td align=\"center\" class=\"warehousbg_01\">");
            StrHtml.Append("<table width=\"96%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
            StrHtml.Append(" <tr> <td align=\"right\"> <a href=\"#\" onclick=\"ImporDataDivClose();\" onfocus=\"this.blur()\"><div class=\"close\" border=\"0\"></div></a></td> </tr>");
            StrHtml.AppendFormat(" <tr><td height=\"22\" align=\"center\" valign=\"bottom\"><span class=\"warehoustitle\">{0}</span> </td></tr>  </table> </td></tr>", StrImporData);
            StrHtml.Append(" <tr> <td class=\"warehousbg_02\">  <div id=\"warehouscontent\">");
            StrHtml.Append(" <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"5\">");
            StrHtml.Append("  <tr> <td colspan=\"5\" height=\"10\"> </td>");
            StrHtml.Append("  </tr>  <tr>");
            StrHtml.AppendFormat(" <td align=\"center\"><iframe width=\"100%\" height=\"100%\" frameborder=\"0\" src=\"../Common/imporData.aspx?action={0}&OrderID={1}&OwnerID={2}&customerID={3}\"></iframe></td>", new object[] { base.Request.QueryString["action"], base.Request.QueryString["OrderID"], base.Request.QueryString["OwnerID"], base.Request.QueryString["customerID"] });
            StrHtml.Append("</tr> </tr></table>");
            StrHtml.Append("  <tr>  <td class=\"warehousbg_03\"> &nbsp;</td> </tr>  </table>");
            this.AssignFunctionResponse(StrHtml.ToString());
        }
    }
}

